package demo.day03

// 26 Kotlin语言的函数类型作为返回类型
fun main() {
    // result 为showAction函数的返回值
    val result = showAction()
    println(result(27, 80.0))
}

private fun showAction(): (Int, Double) -> String {
    val name = "Kiki"
    return { age: Int, weight: Double ->
        val info = "2024年"
        "我的名字是$name,${info},年龄是${age},体重是${weight}kg"
    }
}